//
//  BKIntegralListModel.m
//  bestkeep
//
//  Created by yons on 16/12/5.
//  Copyright © 2016年 utouu. All rights reserved.
//

#import "BKIntegralListModel.h"

@implementation BKIntegralListModel
+(BKIntegralListModel*)getModelWithDic:(NSDictionary *)dic{
    
    BKIntegralListModel * model=[[BKIntegralListModel alloc]init];
    model.changeType=[NSString stringWithFormat:@"%@",dic[@"changeType"]];
    model.createdDate=[NSString stringWithFormat:@"%@",dic[@"createdDate"]];
    model.createdDateStr=[NSString stringWithFormat:@"%@",dic[@"createdDateStr"]];
    model.str_id=[NSString stringWithFormat:@"%@",dic[@"id"]];
    model.integralAmount=[NSString stringWithFormat:@"%@",dic[@"integralAmount"]];
    model.title=[NSString stringWithFormat:@"%@",dic[@"title"]];
    model.type=[NSString stringWithFormat:@"%@",dic[@"type"]];
    model.updatedDate=[NSString stringWithFormat:@"%@",dic[@"updatedDate"]];
    model.updatedDateStr=[NSString stringWithFormat:@"%@",dic[@"updatedDateStr"]];
    model.userId=[NSString stringWithFormat:@"%@",dic[@"userId"]];
    return model;
}

+(NSMutableArray*)getmArrWithDic:(NSDictionary *)dic{
    NSMutableArray  * marr =[[NSMutableArray alloc]init];
    for (NSDictionary * dicc in dic[@"list"]) {
        BKIntegralListModel * model =[BKIntegralListModel getModelWithDic:dicc];
        [marr addObject:model];
    }
    return marr;
}


@end
